use crate::serialization::{ZcashDeserialize, ZcashSerialize};

use super::*;

#[test]
fn librustzcash_tx_deserialize_and_round_trip() {
    // Copied from librustzcash
    // TxID: 64f0bd7fe30ce23753358fe3a2dc835b8fba9c0274c4e2c54a6f73114cb55639
    // From testnet block 280003.
    let data = [
        0x04, 0x00, 0x00, 0x80, 0x85, 0x20, 0x2f, 0x89, 0x01, 0x8f, 0x64, 0x29, 0x96, 0xdf, 0x1e,
        0x93, 0xa6, 0xd7, 0x9a, 0xe5, 0xba, 0xae, 0x34, 0x93, 0xf4, 0x23, 0xca, 0x6c, 0x82, 0xe9,
        0x9f, 0x3e, 0x8d, 0x95, 0x24, 0xfa, 0x78, 0xbc, 0xf1, 0x61, 0x67, 0x00, 0x00, 0x00, 0x00,
        0x6b, 0x48, 0x30, 0x45, 0x02, 0x21, 0x00, 0xb6, 0x5e, 0x37, 0x22, 0x97, 0x07, 0xd9, 0xcd,
        0x48, 0x39, 0x40, 0xd2, 0xab, 0x8b, 0xdc, 0x0b, 0x74, 0xb1, 0x2d, 0xda, 0x66, 0xd0, 0x2d,
        0xbd, 0xf3, 0x6f, 0xd3, 0x83, 0xb9, 0x60, 0x2a, 0x51, 0x02, 0x20, 0x4b, 0xe7, 0xfd, 0x7a,
        0x39, 0xa4, 0xa4, 0x2d, 0xff, 0x07, 0x1a, 0x5a, 0x2b, 0xc5, 0x1b, 0x49, 0x2d, 0x33, 0xf0,
        0xbc, 0x39, 0x4b, 0xc8, 0x78, 0x61, 0xe1, 0xbc, 0xaa, 0xf2, 0xba, 0xc9, 0x3b, 0x01, 0x21,
        0x02, 0x48, 0xe7, 0x8b, 0xdc, 0x18, 0xf1, 0xa8, 0x31, 0x10, 0xc1, 0x2e, 0x40, 0x08, 0xb7,
        0x64, 0x02, 0x69, 0x61, 0xb1, 0x68, 0xfe, 0x8d, 0x5a, 0x8d, 0x94, 0x7e, 0xfe, 0x6a, 0xf8,
        0x3c, 0xc8, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf0, 0xf2, 0x70, 0x18, 0x02, 0x00, 0x00,
        0x00, 0x19, 0x76, 0xa9, 0x14, 0xa2, 0x84, 0xd0, 0x51, 0x1d, 0x0e, 0x52, 0x0d, 0x36, 0xf4,
        0x44, 0xa3, 0x6c, 0x10, 0xbf, 0x54, 0xb4, 0xb0, 0x17, 0xcd, 0x88, 0xac, 0x00, 0x00, 0x00,
        0x00, 0xd7, 0x45, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x01, 0x00, 0xca, 0x9a, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x13, 0x31, 0xa3, 0x05, 0x9e, 0x66, 0xaa, 0x6c, 0xa9, 0x7a, 0x62, 0xf5, 0x6e,
        0xa2, 0x34, 0x20, 0x75, 0x68, 0x56, 0x6f, 0x69, 0x71, 0xb3, 0x72, 0x2a, 0xe0, 0xdd, 0x82,
        0xc0, 0x03, 0x99, 0x69, 0x2a, 0xac, 0xb5, 0xfb, 0x12, 0xac, 0x58, 0x0a, 0xc2, 0x66, 0x24,
        0xa8, 0xcf, 0x0a, 0x90, 0x4c, 0xd6, 0xf4, 0xbf, 0xea, 0x55, 0x62, 0x52, 0x05, 0xcb, 0x58,
        0xf0, 0x6b, 0x1c, 0x19, 0x74, 0x23, 0x28, 0x0d, 0xea, 0xc7, 0x4e, 0xea, 0x97, 0x59, 0x8c,
        0x43, 0x14, 0xd8, 0x99, 0xa4, 0xfd, 0x85, 0x31, 0x1e, 0x04, 0x62, 0x57, 0xd2, 0xd4, 0xc2,
        0x97, 0xf1, 0x40, 0x6c, 0xf7, 0x09, 0xd9, 0x2a, 0x86, 0x07, 0xf7, 0x69, 0x8d, 0x45, 0xfe,
        0x9f, 0x41, 0xde, 0xa3, 0xa0, 0x57, 0x1c, 0x5d, 0xa5, 0xcf, 0xa7, 0x8e, 0x18, 0xeb, 0xf5,
        0x80, 0xc3, 0x61, 0x79, 0xd9, 0xd6, 0xe6, 0x32, 0x0a, 0x34, 0x8f, 0x14, 0x6c, 0x40, 0x7a,
        0xda, 0xb4, 0xcb, 0x31, 0x03, 0x92, 0xa5, 0xf5, 0xb5, 0xab, 0x28, 0x3b, 0x78, 0x34, 0x3b,
        0xa9, 0x1a, 0xbc, 0x7c, 0x4b, 0xfe, 0x23, 0xa3, 0xdb, 0xaf, 0x80, 0x37, 0xc6, 0x76, 0xe5,
        0x95, 0xa2, 0x65, 0x74, 0xb1, 0x81, 0x3b, 0xc2, 0xbf, 0x2d, 0x2e, 0x91, 0x1f, 0x6f, 0x3a,
        0xbb, 0x0b, 0xa6, 0xbc, 0xac, 0x7a, 0x29, 0x01, 0xfb, 0xdc, 0xe6, 0x5f, 0xb0, 0x7b, 0x56,
        0x36, 0x01, 0x7e, 0xf1, 0x4d, 0xff, 0x44, 0xcd, 0xee, 0xa7, 0x30, 0x47, 0x72, 0x94, 0xf2,
        0xf8, 0x61, 0x9b, 0xd3, 0xd5, 0xe6, 0xbe, 0x48, 0x98, 0xbf, 0x8d, 0x39, 0xc0, 0xe0, 0xea,
        0xe5, 0xa3, 0x68, 0x64, 0x62, 0x52, 0x06, 0xb9, 0xa8, 0xf9, 0x94, 0x0b, 0xf1, 0x66, 0x50,
        0xde, 0xf7, 0x92, 0x6e, 0xb0, 0xdb, 0x43, 0xb7, 0xd7, 0x61, 0x5e, 0x47, 0x74, 0xcf, 0x10,
        0x94, 0x82, 0xf2, 0xe8, 0x07, 0xfe, 0xe6, 0xc0, 0xc8, 0x84, 0xe8, 0x31, 0x4c, 0x67, 0xc5,
        0xd8, 0x5f, 0x4c, 0x22, 0x9c, 0xde, 0xab, 0x1e, 0x96, 0x4c, 0xf0, 0xc1, 0xad, 0xcb, 0x47,
        0xce, 0xbf, 0xc7, 0xc0, 0x67, 0xa0, 0xf3, 0xc8, 0x06, 0x81, 0x4a, 0x28, 0x5e, 0xdb, 0xb6,
        0x24, 0xf4, 0x71, 0x06, 0x29, 0x09, 0x89, 0x44, 0xac, 0x75, 0xe7, 0xc9, 0xcb, 0xc5, 0x6b,
        0xd0, 0xa0, 0x29, 0xe1, 0x11, 0x0e, 0xac, 0x60, 0xcb, 0x40, 0x77, 0xeb, 0xf1, 0x08, 0xfe,
        0x3e, 0x67, 0xcd, 0x06, 0x13, 0x91, 0xe5, 0xd6, 0x91, 0x6d, 0x5f, 0x41, 0xc0, 0x2b, 0x89,
        0x14, 0xc1, 0x2c, 0xf6, 0x05, 0xdb, 0x7d, 0x95, 0x92, 0x26, 0xe2, 0xe8, 0xff, 0x71, 0x26,
        0x3b, 0x9a, 0xf4, 0xc5, 0x9b, 0x0f, 0x4d, 0xb3, 0x15, 0xb7, 0x4c, 0xa2, 0xb0, 0xb7, 0xd2,
        0x52, 0x13, 0xd5, 0x29, 0x39, 0x54, 0xc3, 0xe5, 0x11, 0x72, 0x37, 0x0f, 0xb6, 0xc3, 0x5a,
        0xbe, 0x9c, 0xe3, 0x6e, 0xf2, 0x53, 0xe3, 0xa7, 0x2e, 0x19, 0xda, 0xc9, 0xbd, 0x73, 0x62,
        0xc4, 0x49, 0x92, 0x97, 0x42, 0x15, 0xc8, 0x2c, 0xb9, 0x0c, 0x99, 0x48, 0x8d, 0xbd, 0xe1,
        0x19, 0x63, 0xe8, 0x57, 0xce, 0xa6, 0xb8, 0x1b, 0x8e, 0xaa, 0xe3, 0x4b, 0x7c, 0xf5, 0xa9,
        0x7d, 0x6b, 0x60, 0xd4, 0x9f, 0xdf, 0xa2, 0x0f, 0x5f, 0x3c, 0x12, 0x0e, 0xf3, 0x82, 0xca,
        0x24, 0x69, 0x60, 0x4f, 0xb0, 0xc6, 0x84, 0x2c, 0x6d, 0x4f, 0xae, 0x96, 0x61, 0x66, 0x5b,
        0x5c, 0xbc, 0x61, 0x2c, 0xef, 0x13, 0x2f, 0x88, 0xfb, 0x7d, 0xa3, 0x93, 0xf3, 0x56, 0xe3,
        0xad, 0x13, 0xfc, 0x35, 0x57, 0x98, 0x0a, 0x77, 0x34, 0x23, 0x14, 0x53, 0xe4, 0x40, 0x79,
        0x04, 0x2f, 0xb4, 0x32, 0xf5, 0x5e, 0x75, 0x14, 0x84, 0xd5, 0xd6, 0xd3, 0x0f, 0xbc, 0x4f,
        0x99, 0x90, 0x13, 0xd5, 0xd4, 0xf2, 0xfb, 0x62, 0xf7, 0x14, 0x4e, 0x8d, 0xcd, 0x2a, 0xe5,
        0x95, 0x46, 0xcc, 0x43, 0x79, 0xad, 0x9f, 0x18, 0x59, 0xef, 0x80, 0xde, 0xc6, 0x6b, 0x1a,
        0x9b, 0x0b, 0x7f, 0xd2, 0xc4, 0x7b, 0xd3, 0x83, 0x02, 0xd2, 0x9c, 0x31, 0x99, 0x03, 0x29,
        0xa8, 0x95, 0x87, 0x6e, 0xd1, 0xd8, 0x4d, 0xb7, 0x57, 0x85, 0x6e, 0x75, 0xce, 0x9a, 0x1d,
        0xc7, 0xc7, 0x47, 0x2b, 0xc2, 0x18, 0xfb, 0x8d, 0x7c, 0x7d, 0x02, 0x8b, 0xb0, 0x2f, 0x10,
        0xef, 0xe7, 0xfe, 0x6a, 0x8c, 0x9c, 0xe0, 0x34, 0xfe, 0xa6, 0x6b, 0x90, 0x9c, 0x8d, 0x41,
        0x26, 0x25, 0x1c, 0x7d, 0x6e, 0x54, 0xf4, 0xcf, 0xc7, 0x78, 0xcd, 0x4f, 0x0e, 0x0b, 0xad,
        0x10, 0x96, 0x17, 0x6f, 0x2d, 0xd4, 0x5c, 0x45, 0xcb, 0xe1, 0x5e, 0x11, 0x8f, 0x90, 0xff,
        0x25, 0x45, 0xf8, 0x32, 0xf2, 0x36, 0x98, 0xf2, 0xc9, 0x53, 0x1b, 0x52, 0x65, 0x5a, 0x4c,
        0x0c, 0x89, 0x53, 0x55, 0x99, 0x28, 0xee, 0xdf, 0xc7, 0x56, 0xc3, 0x65, 0xcf, 0x92, 0x9b,
        0x84, 0x47, 0xdc, 0xdc, 0x7d, 0x82, 0x38, 0x49, 0xe0, 0x2f, 0xf6, 0x8b, 0x62, 0x78, 0xd7,
        0x54, 0x2c, 0xe0, 0xf1, 0x07, 0x0b, 0xb1, 0xad, 0x91, 0x3c, 0x1a, 0x35, 0x36, 0x25, 0xf5,
        0xd3, 0x5b, 0x14, 0xcf, 0xec, 0x84, 0xa6, 0x33, 0xd7, 0xfe, 0x25, 0x25, 0x6d, 0xcf, 0xfe,
        0x92, 0xf9, 0xa6, 0xf0, 0xfe, 0x00, 0xca, 0xaa, 0xa5, 0xb3, 0x9c, 0xc2, 0xab, 0x06, 0x76,
        0x8a, 0x42, 0xa5, 0xb4, 0x00, 0x83, 0xce, 0xa0, 0x1c, 0x96, 0xb3, 0xe6, 0x8d, 0x0f, 0x6a,
        0x58, 0x7e, 0xaf, 0x2d, 0xa6, 0xfd, 0xad, 0xc8, 0x25, 0x27, 0xf1, 0x86, 0xa6, 0x04, 0x71,
        0xce, 0x98, 0xe2, 0x7d, 0x2b, 0x11, 0xef, 0xc4, 0x79, 0x98, 0xf3, 0x03, 0x0a, 0x7a, 0x2e,
        0x5d, 0x0b, 0x0a, 0x7e, 0xb8, 0x0f, 0x6b, 0xd0, 0xe4, 0xb9, 0xc8, 0x36, 0x7c, 0x6c, 0x52,
        0x2d, 0x94, 0x15, 0xf8, 0xca, 0xec, 0x7b, 0x0a, 0x73, 0x18, 0xd5, 0x3d, 0xce, 0x39, 0x1c,
        0xf7, 0xe7, 0x38, 0x9c, 0x9a, 0x74, 0xaa, 0x6a, 0x4c, 0x21, 0x7c, 0x28, 0x85, 0x19, 0xaf,
        0x81, 0xba, 0x21, 0x22, 0xca, 0x0c, 0x58, 0x40, 0xcc, 0x02, 0xcf, 0x1b, 0xcf, 0x15, 0x0c,
        0xd3, 0xdf, 0x33, 0xc0, 0xac, 0xfd, 0x00, 0x53, 0xe6, 0x68, 0xb9, 0x26, 0x56, 0x1b, 0x92,
        0x40, 0x98, 0xd9, 0x7a, 0xaa, 0xb5, 0x7e, 0xe1, 0x11, 0x3d, 0xf9, 0x66, 0xa4, 0x22, 0xef,
        0x9b, 0x01, 0x46, 0x17, 0xbc, 0xee, 0xf0, 0x5f, 0xb6, 0x46, 0x8e, 0x33, 0x0e, 0x2d, 0xec,
        0xe3, 0xf3, 0x75, 0xe9, 0x8e, 0xf0, 0x3e, 0x5b, 0x18, 0xa9, 0x53, 0xe2, 0x30, 0x1f, 0xcc,
        0xec, 0x86, 0x20, 0x0a, 0xe4, 0x32, 0xc9, 0xc1, 0x2c, 0x30, 0x77, 0x54, 0x37, 0xf3, 0x62,
        0x97, 0x14, 0xa9, 0xfa, 0xbe, 0xb5, 0x32, 0x89, 0x40, 0x2b, 0x7f, 0xd3, 0x86, 0xce, 0xf2,
        0xb1, 0x14, 0x67, 0x23, 0xa8, 0x9d, 0x0f, 0x81, 0x65, 0x1e, 0x00, 0xca, 0xea, 0x2f, 0x3a,
        0xc9, 0xee, 0xfe, 0xfb, 0x86, 0x8d, 0x85, 0xed, 0x23, 0x54, 0xf5, 0x30, 0xfe, 0x38, 0xfe,
        0x3a, 0x3a, 0x6a, 0xab, 0x47, 0xd4, 0x2d, 0xc2, 0x13, 0x29, 0xe3, 0xad, 0x1b, 0x9d, 0x06,
        0xc0, 0xc8, 0xd6, 0x53, 0x74, 0x56, 0xf5, 0x4a, 0xd0, 0x45, 0x3f, 0x44, 0x41, 0x75, 0xd8,
        0x7e, 0xf5, 0xcd, 0xd1, 0x69, 0x46, 0x62, 0xe0, 0xa1, 0xe6, 0xe3, 0x63, 0x2e, 0xd7, 0xa8,
        0xe7, 0x6b, 0xc7, 0xb1, 0xb5, 0xa4, 0x18, 0xf0, 0x86, 0xd3, 0x40, 0x81, 0x5e, 0xc3, 0x98,
        0xf0, 0x92, 0xe9, 0x78, 0x69, 0xf5, 0xe2, 0x01, 0xc2, 0x2c, 0x87, 0x91, 0x8f, 0x76, 0x6a,
        0x35, 0x32, 0xeb, 0x9a, 0x4f, 0xc9, 0xac, 0xf1, 0x96, 0xcb, 0xc2, 0xd0, 0x28, 0x51, 0x19,
        0xa4, 0x21, 0x6d, 0x25, 0x81, 0xcd, 0x2d, 0x91, 0xbc, 0xdc, 0xe8, 0x68, 0xc4, 0x68, 0xf6,
        0xf3, 0x4c, 0xf4, 0x9e, 0x3a, 0x56, 0xce, 0x24, 0x9a, 0x2f, 0xd8, 0xcf, 0x36, 0xb0, 0x1b,
        0x0f, 0x77, 0xde, 0x72, 0x2b, 0xbc, 0xe2, 0x67, 0xe3, 0xe5, 0x52, 0x16, 0x88, 0xe6, 0x52,
        0x22, 0x23, 0x5c, 0x91, 0xc2, 0x63, 0xd8, 0x0e, 0x28, 0x29, 0x7e, 0x92, 0x9d, 0x88, 0x5b,
        0x7b, 0x9c, 0x1a, 0x16, 0x54, 0xb2, 0xd0, 0xb8, 0x75, 0x77, 0xc9, 0xa1, 0xc7, 0x25, 0xf5,
        0x44, 0x15, 0xdc, 0x5f, 0x52, 0xdd, 0xe0, 0x69, 0x5f, 0x9f, 0x6d, 0xcb, 0x4b, 0x6e, 0xe3,
        0xe3, 0xea, 0x70, 0x29, 0x04, 0xc1, 0x1f, 0xf9, 0x2f, 0x55, 0x53, 0x4c, 0x7e, 0xf9, 0x8c,
        0xe7, 0x93, 0xd7, 0x47, 0x56, 0xa4, 0x5d, 0x4e, 0x32, 0x0a, 0x42, 0x5e, 0x98, 0x2d, 0x5b,
        0x37, 0x2d, 0x6a, 0x8d, 0x41, 0xfb, 0x86, 0xba, 0x51, 0x64, 0x81, 0x68, 0x32, 0xa4, 0x81,
        0x82, 0x5c, 0x8c, 0x6a, 0xd7, 0x27, 0x09, 0x69, 0x85, 0x9e, 0x55, 0xd2, 0x36, 0x75, 0x35,
        0x06, 0x0f, 0x99, 0x85, 0x70, 0x65, 0x17, 0x04, 0x66, 0xbd, 0xb7, 0x0c, 0xb9, 0x3a, 0xb2,
        0xf9, 0xc0, 0xe2, 0x93, 0xa0, 0xa9, 0x19, 0x84, 0x3b, 0xbf, 0x34, 0xc2, 0xfe, 0x61, 0xb0,
        0xc3, 0xe3, 0x2a, 0xa7, 0x07, 0x8e, 0x83, 0xd4, 0xc1, 0x92, 0x9e, 0x1e, 0x1d, 0x86, 0x14,
        0x1c, 0xde, 0xb1, 0x89, 0x20, 0x91, 0x09, 0x75, 0xdb, 0x3a, 0x76, 0x26, 0x82, 0x05, 0x99,
        0x63, 0x0c, 0x42, 0x3a, 0xde, 0x23, 0x3d, 0x5d, 0x60, 0x68, 0x55, 0x24, 0xe8, 0xd8, 0x03,
        0x2b, 0x86, 0x1b, 0x4a, 0xad, 0x20, 0x02, 0xa8, 0xfd, 0x17, 0xc9, 0x28, 0x2b, 0x82, 0x5f,
        0x02, 0xd3, 0x53, 0xe2, 0x91, 0x37, 0x9c, 0xed, 0x00, 0xeb, 0xaa, 0x3c, 0x03, 0xe0, 0x1d,
        0x9c, 0x59, 0xf4, 0x05, 0x09, 0x9d, 0x1c, 0x34, 0x32, 0xba, 0xd0, 0x63, 0x58, 0xd6, 0xb1,
        0x94, 0x2f, 0x0b, 0xaf, 0x71, 0x09, 0x98, 0xd1, 0x0a, 0x22, 0xd1, 0x55, 0xb0, 0xfe, 0x84,
        0x99, 0x52, 0x89, 0x31, 0x26, 0x94, 0x9f, 0xf9, 0x2d, 0xe3, 0xa4, 0xc2, 0xee, 0xaf, 0xdf,
        0x68, 0x84, 0x35, 0xe3, 0x25, 0xd8, 0x1c, 0x2c, 0xe0, 0x08, 0xcf, 0x6c, 0x76, 0x03, 0x0d,
        0x4d, 0x46, 0x34, 0x2a, 0xc3, 0x37, 0x2c, 0x73, 0x98, 0x65, 0x60, 0xc4, 0xec, 0x35, 0xa6,
        0xf6, 0x49, 0xef, 0x02, 0xc1, 0x19, 0x36, 0xb7, 0x03, 0x9b, 0xc6, 0xf5, 0xd0, 0x94, 0x38,
        0xdb, 0xe4, 0x76, 0x25, 0x1b, 0x59, 0x64, 0xb6, 0x8f, 0x02, 0xee, 0xdf, 0xf7, 0xa9, 0xe0,
        0xed, 0x3e, 0x30, 0x90, 0x96, 0x5a, 0x22, 0xf2, 0xc5, 0x52, 0xce, 0x3b, 0x2b, 0x47, 0x4f,
        0xd2, 0xfc, 0x06, 0xb5, 0x09, 0x27, 0x83, 0x0a, 0x05, 0xa3, 0x03, 0xfa, 0xff, 0xd6, 0x84,
        0x82, 0xd7, 0xb7, 0x85, 0x38, 0x43, 0x25, 0x40, 0xdd, 0x32, 0x61, 0xab, 0x75, 0x9b, 0x65,
        0x82, 0x12, 0x9a, 0x7f, 0x18, 0xd8, 0x01, 0xc5, 0x43, 0x19, 0xca, 0x52, 0xa3, 0xc6, 0xa3,
        0xdb, 0x63, 0x50, 0x44, 0xd6, 0x25, 0xe2, 0x40, 0x38, 0xad, 0x42, 0x77, 0xf8, 0xd5, 0xbf,
        0x01, 0x60, 0x35, 0x16, 0x5f, 0x21, 0xb0, 0x70, 0xe8, 0x16, 0x9d, 0x65, 0x7d, 0x6e, 0xd1,
        0xfa, 0x7f, 0x8e, 0xd0, 0x9b, 0x4e, 0x1d, 0x9c, 0xa2, 0xe5, 0x1a, 0x24, 0xda, 0x55, 0xe4,
        0x3b, 0x3f, 0xca, 0x98, 0x59, 0xb2, 0x40, 0x8c, 0x26, 0xaa, 0xcb, 0xad, 0x74, 0x9e, 0xbe,
        0x88, 0x2c, 0x31, 0xe7, 0x20, 0x5e, 0x63, 0x8b, 0xb7, 0xe2, 0xbf, 0xc8, 0xa3, 0xf1, 0xc0,
        0x2c, 0x0c, 0xa7, 0xbb, 0x9d, 0xaa, 0xab, 0x7f, 0xcb, 0xf8, 0x45, 0xd8, 0x00, 0x2c, 0x3d,
        0xe7, 0x99, 0x24, 0xdc, 0xaa, 0xdc, 0x24, 0xbd, 0xc0, 0x08, 0x2f, 0x4a, 0x6b, 0x61, 0x87,
        0x6f, 0x31, 0x92, 0xa8, 0x81, 0xf5, 0x9a, 0x68, 0x2d, 0x27, 0x36, 0x85, 0xd4, 0x79, 0x5c,
        0x9b, 0xd7, 0xcc, 0xcf, 0x49, 0xde, 0x34, 0x44, 0x3a, 0x9f, 0x9c, 0xb3, 0x5b, 0xbf, 0x25,
        0x4c, 0x50, 0x61, 0x1b, 0x7c, 0x13, 0x24, 0xb1, 0x10, 0x94, 0x66, 0x7b, 0x6b, 0x60, 0x8c,
        0x39, 0xd1, 0x25, 0x2c, 0xeb, 0xcc, 0x48, 0x77, 0xce, 0xea, 0x76, 0xe1, 0x9b, 0x84, 0x2b,
        0x67, 0xf6, 0x26, 0x74, 0x3f, 0xab, 0x29, 0x77, 0x76, 0xcc, 0x9c, 0xf7, 0x9e, 0x90, 0xe8,
        0xfc, 0xe1, 0x00, 0x17, 0x90, 0xc2, 0xe7, 0xd5, 0xc9, 0x58, 0x64, 0x7c, 0xca, 0x5d, 0x33,
        0x97, 0xd2, 0x0a, 0xfc, 0xf2, 0x9b, 0xa4, 0x4f, 0x62, 0xa7, 0xc6, 0x2e, 0x90, 0x8d, 0x84,
        0x8d, 0x81, 0xa7, 0x9f, 0xad, 0xbb, 0x37, 0x0a, 0xba, 0x93, 0xb0, 0x3e, 0x41, 0xd4, 0xbc,
        0x49, 0xe2, 0x99, 0xd6, 0xd3, 0x3f, 0xaf, 0x86, 0x9f, 0x36, 0x37, 0x14, 0x14, 0xce, 0x64,
        0x6f, 0xc2, 0xca, 0x6d, 0xcf, 0xf5, 0x5a, 0x6e, 0x06, 0x39, 0xd5, 0x0c, 0xae, 0xb1, 0x14,
        0xc4, 0x18, 0xc6, 0x26, 0xb8, 0x67, 0x15, 0x43, 0x64, 0x81, 0xd1, 0x92, 0x8d, 0x55, 0xa7,
        0x56, 0xa6, 0x03, 0xe7, 0x11, 0x0c, 0x3a, 0xfe, 0x96, 0x3c, 0x2b, 0x29, 0xa4, 0x78, 0xf9,
        0xd4, 0x39, 0x7b, 0x88, 0x5a, 0x67, 0xb0, 0x93, 0xa3, 0x45, 0x79, 0x62, 0x19, 0xc1, 0x11,
        0xb7, 0xe9, 0x4d, 0xb3, 0x90, 0xaa, 0x4b, 0xb7, 0x6b, 0x66, 0xa5, 0x34, 0xe5, 0xe2, 0x67,
        0x9b, 0x27, 0xdb, 0x5f, 0x95, 0xfd, 0x09, 0xa3, 0x6b, 0x05,
    ];

    let tx = Transaction::zcash_deserialize(&data[..])
        .expect("transaction test vector from librustzcash should deserialize");

    println!("{:?}", tx);

    let mut data2 = Vec::new();
    tx.zcash_serialize(&mut data2).expect("tx should serialize");

    assert_eq!(&data[..], &data2[..]);
}
